<?php

namespace App\Http\Controllers;


use Illuminate\Http\Request;
class SettingController extends BaseController
{
    public function index(Request $request)
    {
        $param = $this->validate($request,[
            'key' => 'required'
        ]);

        if ($param['key']=='hot_brand'){
            return  $this->success(['value' => admin_setting_array($param['key'])]);
        }

        if ($param['key']=='customer_service_number'){
            return  $this->success(['value' => admin_setting_array($param['key'])]);
        }

        return  $this->success(['value' => admin_setting($param['key'])]);


    }
}
